package main

func main() {

	println(canConstruct("aa", "aab"))
}

func canConstruct(ransomNote string, magazine string) bool {

	m := make(map[rune]int)

	for _, i := range ransomNote {
		if _, ok := m[i]; ok {
			m[i]++
			continue
		}

		m[i] = 1
	}

	for _, i := range magazine {
		if _, ok := m[i]; ok {
			m[i]--
			if m[i] == 0 {
				delete(m, i)
			}
		}
	}

	return len(m) == 0
}
